<?php

use yii\helpers\Html;
use yii\widgets\ActiveForm;
use common\models\modelled\Modelled;
$modeled = Modelled::find()->andWhere(['id'=>Yii::$app->request->get()['id']])->asArray()->one();
/* @var $this yii\web\View */
/* @var $model common\models\modelled\Modeloption */
/* @var $form yii\widgets\ActiveForm */

?>

<div class="modeloption-form">

    <?php $form = ActiveForm::begin(); ?>

    <input type="hidden" name="Modeloption[category]" value="<?= Yii::$app->request->get()['id'] ?>"/>
 <input type="hidden" name="Modeloption[type]" value="<?= $modeled['name'] ?>"/>
    <?= $form->field($model, 'name')->textInput(['maxlength' => true]) ?>



    <div class="form-group">
        <?= Html::submitButton($model->isNewRecord ? Yii::t('app', 'Create') : Yii::t('app', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
    </div>

    <?php ActiveForm::end(); ?>

</div>
